import {
    createRouter, createWebHashHistory
} from "vue-router";

// 定义路由配置数组
const routes = [
    {
        path: '/',
        redirect: '/login',
    },
    {
        name: 'login',
        path: '/login',
        component: () => import('@/views/login/index.vue')
    },
    {
        name: 'menu',
        path: '/menu',
        component: () => import('@/views/menu/index.vue'),
        children: [
            {
                name: 'home',
                path: '/home',
                component: () => import('@/views/home/index.vue'),
            },
            {
                name: 'setting',
                path: '/setting',
                component: () => import('@/views/setting/index.vue')
            },
            {
                name: 'overview',
                path: '/overview',
                component: () => import('@/views/overview/index.vue')
            },
            {
                name: 'superManager',
                path: '/superManager',
                component: () => import('@/views/user/super_manager/index.vue')
            },
            {
                name: 'manager',
                path: '/manager',
                component: () => import('@/views/user/manager/index.vue')
            },
            {
                name: 'student',
                path: '/student',
                component: () => import('@/views/user/user_list/index.vue')
            },
            {
                name: 'applyAid',
                path: '/applyAid',
                component: () => import('@/views/flow/applyA/index.vue')
            },
            {
                name: 'applyScholarship',
                path: '/applyScholarship',
                component: () => import('@/views/flow/applyS/index.vue')
            },
            {
                name: 'auditByGroup',
                path: '/auditByGroup',
                component: () => import('@/views/flow/auditByGroup/index.vue')
            },
            {
                name: 'auditByTutor',
                path: '/auditByTutor',
                component: () => import('@/views/flow/auditByTutor/index.vue')
            },
            {
                name:'application',
                path: '/application',
                component: () => import('@/views/application/index.vue')
            },
            {
                name:'message_list',
                path: '/message_list',
                component: () => import('@/views/message/message_list/index.vue')
            },
            {
                name:'recycle',
                path: '/recycle',
                component: () => import('@/views/message/recycle/index.vue')
            },
            {
                name:'loginLog',
                path: '/loginLog',
                component: () => import('@/views/login_log/index.vue')
            },
            {
                name:'operationLog',
                path: '/operationLog',
                component: () => import('@/views/operation_log/index.vue')
            },
            {
                name:'feedback_form',
                path: '/feedback_form',
                component: () => import('@/views/feedback/form.vue')
            },
            {
                name:'feedback_list',
                path: '/feedback_list',
                component: () => import('@/views/feedback/list.vue')
            },
            {
                name:'feedback_admin',
                path: '/feedback_admin',
                component: () => import('@/views/feedback/admin.vue')
            }
        ]
    },
];

// 创建路由实例
const router = createRouter({
    history: createWebHashHistory(),
    routes
});

// 导出路由实例
export default router;

